<template>
<div class="layerRtb layerRtb-threecolumn">
    <three-title :title="{name:'工艺'}"></three-title>
    <div class="layerRtb-scroll thinScroll" v-scrollHeight = "137">
        <div class="analyItem">
            <p class="analyItemTit tx-center">项目</p>
            <div class="analyItemCon">
                <p class="col-md-4">
                    <span class="cLightGray pr8">项目数量</span>
                    <span>{{wokerCarft.orderCount}}</span>
                </p>
                <p class="col-md-4">
                    <span class="cLightGray pr8">工艺上传</span>
                    <span>{{wokerCarft.craftUploadCount}}</span>
                </p>
                <p class="col-md-4">
                    <span class="cLightGray pr8">占比</span>
                    <span>{{wokerCarft.proportion}}</span>
                </p>
            </div>
        </div>
        <div class="analyItem">
            <p class="analyItemTit tx-center">订单</p>
            <div class="analyItemCon">
                <p class="col-md-4">
                    <span class="cLightGray pr8">工艺订单</span>
                    <span>{{wokerCarft.craftOrderCount}}</span>
                </p>
                <p class="col-md-4">
                    <span class="cLightGray pr8">上传</span>
                    <span>{{wokerCarft.craftUploadCount}}</span>
                </p>
                <p class="col-md-4">
                    <span class="cLightGray pr8">完成率</span>
                    <span>{{wokerCarft.craftRate}}%</span>
                </p>
            </div>
        </div>

    </div>
    <div class="layerRtb-footer">
        <div class="analyItem">
            <p class="analyItemTit tx-center">综合</p>
            <div class="analyItemCon">
                <p class="col-md-4">
                    <span class="cLightGray pr8">项目上传</span>
                    <span>{{wokerCarft.finishCraftCount}}</span>
                </p>
                <p class="col-md-4">
                    <span class="cLightGray pr8">工艺上传</span>
                    <span>{{wokerCarft.craftUploadCoun}}</span>
                </p>
                <p class="col-md-4">
                    <span class="cLightGray pr8">完成率</span>
                    <span>{{wokerCarft.craftRate}}%</span>
                </p>
            </div>
        </div>
    </div>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import { getCompletedCarft } from '../../Resources/Api'
export default {
    data () {
        return {
            parmasExample: {
                name: '',
                age: ''
            },
            wokerCarft: {}
        }
    },
    created () {
        this.getCompletedCarft() // 工艺
    },
    computed: {
        ...mapGetters(['userInfo', 'leftInfo'])
    },
    methods: {
        getCompletedCarft () {
            getCompletedCarft({
                areaId: this.leftInfo.u_diqu
            }).then(res => {
                if (res.data.StatusCode === 1) {
                    this.wokerCarft = res.data.Body
                }
            }).catch(err => {
                console.log(err)
            })
        }
    }
}
</script>
